package psd.model.Prolog.Converters;

import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;

import psd.model.IConverter;
import psd.model.Prolog.FactGenerationToolbox;
import psd.model.Prolog.PrologConverter;


public class PrologAnnotationTypeMemberDeclarationConverter extends
		PrologConverter implements IConverter<AnnotationTypeMemberDeclaration> {

	public PrologAnnotationTypeMemberDeclarationConverter(
			FactGenerationToolbox toolbox) {
		super(toolbox);
	}

	@Override
	public boolean convert(AnnotationTypeMemberDeclaration node) {
		String id = idResolver.getID(node);
		writer.writeFact("annotationMemberT", new String[] { id,
				getParentId(node), typeResolver.getTypeTerm(node.getType()),
				quote(node.getName()), idResolver.getID(node.getDefault()), this.getFilePath(node), this.getLineNumber(node) });
		checkAndGenComments(node, id);
		return true;
	}

}
